import sys
import os
from sets import Set
reactions = Set()
with open(sys.argv[1], "r") as fileMeta:
	tab = fileMeta.read().replace('\r\n','\n').splitlines()
fileMeta.close()

for couple in tab:
		reactions.update(couple.split())

for elem in reactions:
	print(elem)